package com.fanxing.anno;

@Anno01(fun1="a",fun2=18,fun3=Test02.class,fun4=Thread.State.NEW,fun5 = @Anno02(name = "zhangsan",value = "aaa"),fun6 = "a")
/**
 * class x implements Anno01{
 *     String fun1(){
 *         return "a";
 *     }
 *     ....
 * }
 */
@Anno02("aaa")
//@Anno03(value={"a","b"})
//@Anno03({"a","b","c"})
//@Anno03({"a"})
@Anno03("a")
public class Test02 {
}

/**
 * 注解的本质是 接口
 *   常量
 *   抽象方法
 *   default方法
 *   static方法
 */
@interface Anno01{
    String fun1();
    int fun2();
    Class fun3();
    Thread.State fun4();
    Anno02 fun5();
    String[] fun6();
}

@interface Anno02{
    String name() default "aaa" ;
    int age() default 18;
    String value();
}

@interface  Anno03{
    String[] value();
}
